﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProgNetComponentsDx.Browsers.Design
{
    public class BrowserColumnMemberEditor : ProgNetComponents.Design.Editors.BaseListEditor
    {
        protected override bool FillCollection(ProgNetComponents.Collections.NamedObjectCollection collection, System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            if (context != null && context.Instance != null && context.Instance is Browser)
            {
                foreach (BrowserColumn c in (context.Instance as Browser).Columns)
                    collection.Add(c.Name, c.Name);
            }
            return true;
        }
    }
}
